fix: fix connection details page so XRD and Composition keys match#1033
Conversation
Signed-off-by: Jared Watts <jbw976@gmail.com>
✅ Deploy Preview for crossplane ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| type: FromConnectionSecretKey | ||
| fromConnectionSecretKey: password | ||
| - name: key | ||
| - name: secret |
There was a problem hiding this comment.
standardizing on using secret for this key name, as used other places
| @@ -165,12 +165,12 @@ metadata: | |||
| spec: | |||
| group: example.org | |||
| connectionSecretKeys: | |||
There was a problem hiding this comment.
this is a correct list of connection secret keys to include in the XR and Claim's secrets. They match exactly what is being used in the Composition, so all 8 of these keys will now make it to the final XR/Claim secrets. e.g.:
❯ kubectl describe Secret/my-access-key-secret
Name: my-access-key-secret
Namespace: default
Labels: <none>
Annotations: <none>
Type: connection.crossplane.io/v1alpha1
Data
====
key2-password: 40 bytes
key2-secret: 40 bytes
key2-smtp: 44 bytes
key2-user: 20 bytes
password: 40 bytes
secret: 40 bytes
smtp: 44 bytes
user: 20 bytes
| type: FromConnectionSecretKey | ||
| fromConnectionSecretKey: password | ||
| - name: key | ||
| - name: secret |
There was a problem hiding this comment.
another place to standardize on using secret for the name of this key so it's consistent
|
Oh - just noticed Vale is sad though. Looks like these are pre-existing? |
yep yep, they are warnings (not errors) that are pre-existing 😅 |

While getting deeper into making sense of connection secrets in v2 for #1001, I wanted to walk through how connection details worked in v1 scenarios. The docs page for that content, https://docs.crossplane.io/v1.20/concepts/connection-details, has a couple issues preventing it from working correctly.
This PR updates that content to ensure that the connection details key names in the XRD match what is being used in the Composition. When they are not matching, the desired keys do not make it to the final XR and Claim connection secrets because they get filtered out by the XRD's
.spec.connectionSecretKeyslist.